<?php

class User extends Model
{
    public $pk='id';
    public $tableName='user';
    protected $status, $role;

    protected static $rolesNames=array(
        0=>'Гость',
        1=>'Пользователь',
        2=>'Модератор',
        3=>'Админ',
    );
    protected static $statusesNames=array(
        0=>'Заморожен',
        1=>'Активен',
    );

    public function setStatus($status)
    {
       if(is_string($status)) $this->status=$status;
    }

    public function getStatus()
    {
        return self::$statusesNames[$this->status];
    }

    public function setRole($role)
    {
        if(is_string($role)) $this->role=$role;
    }

    public function getRole()
    {
        return self::$rolesNames[$this->role];
    }
}